import { util } from "../etc/Util";
import VelocityEffect_Generate from "../ui-generate/VelocityEffect_generate";

export class VelocityEffect extends VelocityEffect_Generate {

    onStart() {
        this.canUpdate = true
        this.layer = UILayerDialog
    }

    onUpdate() {
        let deltaF = (TimeUtil.elapsedTime() * 1.5) % 1
        let n_deltaF = (TimeUtil.elapsedTime() * 1.5 + 0.5) % 1

        let scaleLerp = util.lerp(1, 1.65, deltaF)
        this.img_1.renderScale = util.getTemporaryVector2(scaleLerp, scaleLerp)

        let scaleLerp2 = util.lerp(1, 1.65, n_deltaF)
        this.img_2.renderScale = util.getTemporaryVector2(scaleLerp2, scaleLerp2)
    }
}